package by.vr.jpa.result.transformer.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import by.vr.jpa.result.transformer.api.EntityInstantiator;

public class SimpleEntityInstantiator  implements EntityInstantiator{
	
	private static final Logger logger = LoggerFactory.getLogger(SimpleEntityInstantiator.class);

	
	
	public <T> T instantiate(Class<T> clazz) {
		try {
			return clazz.newInstance();
		} catch (Exception e) {
			logger.error("", e);
			throw new RuntimeException(e);
		} 
	}

}
